Conventionally, as one of wireless data communications, Bluetooth communication to which a spectrum spreading method is applied using the 2.4-GHz frequency band is available. In the Bluetooth communication, the data communication is performed in a packet switching method in which data is transmitted as a packet in a specific unit.
In the Bluetooth communication, a profile is defined according to an individual use condition, and the communication is controlled in accordance with the profile.
A Hardcopy Cable Replacement Profile (to be referred to as “HCRP” hereinafter), which is one of the profiles defines, in detail, a method of communicating between a host PC, and printer and/or scanner devices. The communication is performed via a Logical Link Control and Adaptation Protocol (to be referred to as “L2CAP” hereinafter) defined by Bluetooth. In the HCRP, the communication data is transmitted via a data channel to perform various control operations via a control channel.
The data flow control is defined to be implemented in a method of transmitting a credit which represents a data amount to be received by its own device via the data channel, to a communication partner via the control channel. Such process of transmitting the credit to the transmission side is also used in accordance with another protocol (e.g., Japanese Patent Publication Laid Open No. 2001-094613 (hereinafter referred to as “JPA 2001-094613”)). As the maximum number of data to be transmitted as one packet via the data channel, a maximum transmission unit (to be referred to as an MTU hereinafter) determined by making a negotiation via the L2CAP layer is used. Since the minimum data transmission unit is 1 byte, the length of the data packet to be transferred may be ranging from 1-byte to MTU.
However, almost all the devices transmit data in unit of a transmittable maximum data amount of its own device when performing burst transfer in a case where the transmittable maximum data amount of its own device does not reach the MTU.
Alternatively, in a credit management method in the conventional packet communication, the credit is managed for each packet. Hence, as a hardware arrangement for the communication data transfer, there exists an apparatus which include a circuit capable of DMA-transferring, packet by packet, the data received in unit of packet, and continuously reading the data without being conscious of any packet break.
Generally, as a transmission/reception buffer in such hardware, a plurality of buffers having a specific capacity are provided to use one buffer for each packet. The received data packet is stored with the header and footer into a buffer. Then, the address and the number of bytes of transferred data of the data portion (excluding the header and the footer) of the data packet are examined, and the registration of transfer reservation is made in a specified transfer reservation FIFO. The same processing is performed on the subsequently received data packet, and the registration of transfer reservation is made according to a data reception sequence. For example, when a data analyzer such as MPU or ASIC reads the data portion stored in the buffer according to the registration sequence of the transfer reservation, and performs DMA-transfer. By performing the above process on the data stored in the plurality of buffers, it is possible to read each packet as continuous data. Packet data is sequentially read by activating the DMA, and a buffer from which all of the bytes have been transferred becomes available again. As a result, the number of available buffers is incremented.
However, in a case where the credit is managed in unit of the data amount according to the HCRP in the above-described conventional hardware arrangement, in consideration of one packet containing only 1-byte data, the transmittable credit byte is (the number of available packets×1 byte). Therefore, only an extremely small number of credits can be transmitted, thereby greatly reducing a transfer rate. JPA 2001-094613 points out that the transfer efficiency is deteriorated in the above condition.
Furthermore, in a case where the data analyzer cannot read the data because it becomes busy due to some reason, the buffer can no longer be used for receiving packet, and the data reception becomes disabled.